package com.qkl.xiatang.app.service.impl;

import com.qkl.xiatang.app.config.AppConfig;
import com.qkl.xiatang.app.utils.OssBootUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;

@Service
public class AliyunOssService {

    @Autowired
    private AppConfig appConfig;

    @PostConstruct
    public void initOssBootUtil(){
        OssBootUtil.setAccessKeyId(appConfig.getAliyunOssAccessKey());
        OssBootUtil.setEndPoint(appConfig.getAliyunOssEndpoint());
        OssBootUtil.setAccessKeySecret(appConfig.getAliyunOssSecretKey());
        OssBootUtil.setBucketName(appConfig.getAliyunOssBucketName());
    }



}
